/*
 * CPU_Backend.h
 *
 *  Created on: 2010-06-13
 *      Author: Daniel
 */

#ifndef CPU_BACKEND_H
#define CPU_BACKEND_H

#include "Vector.h"
#include "Matrix.h"

int _cpu_init();

int _cpu_shutdown();

int _cpu_vector_copy(const Vector& source, Vector& dest);

int _cpu_vector_literal(Vector& dest, float begin, float end, float step = 1);

int _cpu_vector_equal(const Vector& first, const Vector& second);

int _cpu_vector_nequal(const Vector& first, const Vector& second);

int _cpu_vector_plus_vector(Vector& result, const Vector& first, const Vector& second);

int _cpu_vector_minus_vector(Vector& result, const Vector& first, const Vector& second);

int _cpu_matrix_times_vector(Vector& result, const Matrix& matrix, const Vector& vector);

int _cpu_vector_times_matrix(Vector& result, const Matrix& matrix, const Vector& vector);

int _cpu_matrix_copy(const Matrix& source, Matrix& dest);

int _cpu_matrix_equal(const Matrix& first, const Matrix& second);

int _cpu_matrix_nequal(const Matrix& first, const Matrix& second);

int _cpu_matrix_plus_matrix(Matrix& result, const Matrix& first, const Matrix& second);

int _cpu_matrix_minus_matrix(Matrix& result, const Matrix& first, const Matrix& second);

int _cpu_matrix_times_matrix(Matrix& result, const Matrix& first, const Matrix& second);

int _cpu_scalar_times_vector(Vector& result, const Vector& vector, float scalar);

int _cpu_scalar_times_matrix(Matrix& result, const Matrix& matrix, float scalar);

int _cpu_vector_div_scalar(Vector& result, const Vector& vector, float scalar);

int _cpu_matrix_div_scalar(Matrix& result, const Matrix& matrix, float scalar);

#endif
